package com.george.stock.controller;

import com.george.stock.service.StockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Create By George on /2023/4/10
 * description: 库存服务控制器
 *
 * @author George
 */
@Api(tags = "库存模块")
@RestController
@RequestMapping("/stock")
public class StockController {

    @Resource
    private StockService stockService;

    @ApiImplicitParam(name = "orderID", value = "订单号",required = true)
    @ApiOperation(value = "订单出库")
    @GetMapping("/outStock/{orderId}")
    public String outStock(@PathVariable("orderId") String orderId) {
        stockService.outStock(orderId);
        return "success";
    }

}
